﻿using System;
using System.Collections.Generic;
using MVCFoto.IDAL;
using MVCFoto.Model;

namespace MVCFoto.BLL
{
    public class Comment
    {
        private static readonly IComment dal = MVCFoto.DALFactory.Factory.Create<IComment>("Comment");
         public int AddComment(int photoId, string content)
        {
            UserInfo ui = BLL.User.MyInfo;
            return dal.AddComment(photoId, ui.UserID,ui.UserName, content);
        }
        public bool DeleteComment(int photoId, int commentId)
        {
            return dal.DeleteComment(photoId, commentId);
        }
        public IList<CommentInfo> GetPhotoComments(int photoId)
        {
            return dal.GetPhotoComments(photoId);
        }
    }
}
